package com.ys.entity.news;

import java.util.Date;
import javax.persistence.Table;
import com.ys.annotation.YsField;
import com.ys.entity.base.BaseEntity;
/**
*/
@Table(name="NEWS_Item", catalog="Id")
public class NewsItem extends BaseEntity<NewsItem> {

	@YsField(nameDataBase="Id", nameJava="id", typeDataBase="bigint")
	private Long id;
	@YsField(nameDataBase="Pid", nameJava="pid", typeDataBase="bigint")
	private Long pid;
	@YsField(nameDataBase="Lev", nameJava="lev", typeDataBase="tinyint")
	private Integer lev;
	@YsField(nameDataBase="Name", nameJava="name", typeDataBase="varchar")
	private String name;
	@YsField(nameDataBase="Img", nameJava="img", typeDataBase="varchar")
	private String img;
	@YsField(nameDataBase="SortNo", nameJava="sortNo", typeDataBase="int")
	private Integer sortNo;
	@YsField(nameDataBase="Detail", nameJava="detail", typeDataBase="text")
	private String detail;
	@YsField(nameDataBase="Status", nameJava="status", typeDataBase="tinyint")
	private Integer status;
	@YsField(nameDataBase="CreateTime", nameJava="createTime", typeDataBase="datetime")
	private Date createTime;
	@YsField(nameDataBase="UpdateTime", nameJava="updateTime", typeDataBase="datetime")
	private Date updateTime;

	public Long getId() {
		return id;
	}
	public NewsItem setId(Long id) {
		this.id = id;
		return this;
	}
	public Long getPid() {
		return pid;
	}
	public NewsItem setPid(Long pid) {
		this.pid = pid;
		return this;
	}
	public Integer getLev() {
		return lev;
	}
	public NewsItem setLev(Integer lev) {
		this.lev = lev;
		return this;
	}
	public String getName() {
		return name;
	}
	public NewsItem setName(String name) {
		this.name = name;
		return this;
	}
	public String getImg() {
		return img;
	}
	public NewsItem setImg(String img) {
		this.img = img;
		return this;
	}
	public Integer getSortNo() {
		return sortNo;
	}
	public NewsItem setSortNo(Integer sortNo) {
		this.sortNo = sortNo;
		return this;
	}
	public String getDetail() {
		return detail;
	}
	public NewsItem setDetail(String detail) {
		this.detail = detail;
		return this;
	}
	public Integer getStatus() {
		return status;
	}
	public NewsItem setStatus(Integer status) {
		this.status = status;
		return this;
	}
	public Date getCreateTime() {
		return createTime;
	}
	public NewsItem setCreateTime(Date createTime) {
		this.createTime = createTime;
		return this;
	}
	public Date getUpdateTime() {
		return updateTime;
	}
	public NewsItem setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
		return this;
	}

	public static NewsItem newsItem(
		Long pid,
		Integer lev,
		String name,
		String img,
		Integer sortNo,
		String detail,
		Integer status
			) {
		NewsItem entity = new NewsItem();
		entity.setPid(pid);
		entity.setLev(lev);
		entity.setName(name);
		entity.setImg(img);
		entity.setSortNo(sortNo);
		entity.setDetail(detail);
		entity.setStatus(status);
		return entity;
	}
}